//
//  RecommendModel.m
//  Journey
//
//  Created by dllo on 16/5/16.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "RecommendModel.h"
#import "SlideModel.h"
#import "SubjectModel.h"
#import "Discount_subjectModel.h"
#import "DiscountModel.h"

@implementation RecommendModel
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    
}

-(void)setSlide:(NSMutableArray *)slide{
    _slide = slide;
    NSMutableArray *slideArray = [NSMutableArray array];
    for (NSDictionary *slideDic in _slide) {
        SlideModel *slideModel = [[SlideModel alloc] init];
        [slideModel setValuesForKeysWithDictionary:slideDic];
        [slideArray addObject:slideModel];
    }
    _slide = [NSMutableArray arrayWithArray:slideArray];
}

-(void)setSubject:(NSMutableArray *)subject
{
    _subject = subject;
    NSMutableArray *subArray = [NSMutableArray array];
    for (NSDictionary *subjectDic in _subject) {
        SubjectModel *subjectModel = [[SubjectModel alloc] init];
        [subjectModel setValuesForKeysWithDictionary:subjectDic];
        
        [subArray addObject:subjectModel];
    }
    _subject = [NSMutableArray arrayWithArray:subArray];
}

-(void)setDiscount_subject:(NSMutableArray *)discount_subject{
    _discount_subject = discount_subject;
    NSMutableArray *disSArray = [NSMutableArray array];
    for (NSDictionary *disDic in _discount_subject) {
        Discount_subjectModel *dismodel = [[Discount_subjectModel alloc] init];
        [dismodel setValuesForKeysWithDictionary:disDic];
        [disSArray addObject:dismodel];
    }
    _discount_subject = [NSMutableArray arrayWithArray:disSArray];
}

-(void)setDiscount:(NSMutableArray *)discount
{
    _discount = discount;
    NSMutableArray *countArray = [NSMutableArray array];
    for (NSDictionary *countDic in _discount) {
        DiscountModel *countModel = [[DiscountModel alloc] init];
        [countModel setValuesForKeysWithDictionary:countDic];
        [countArray addObject:countModel];
    }
    _discount = [NSMutableArray arrayWithArray:countArray];
}


@end
